package edu.scnu.fans.fingertip.user.input;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("用户收货地址")
public class UserAddressDto {

    @ApiModelProperty("id，添加时不用传入")
    private Long id;

    @NotBlank(message = "不能为空")
    @Size(min = 1, max = 50, message = "长度为1~50字符")
    @ApiModelProperty("收件人")
    private String receiver;

    @NotBlank(message = "不能为空")
    @Size(min = 1, max = 50, message = "长度为1~50字符")
    @ApiModelProperty("收件人手机号")
    private String mobile;

    @NotBlank(message = "不能为空")
    @Size(min = 1, max = 50, message = "长度为1~50字符")
    @ApiModelProperty("省份")
    private String province;

    @NotBlank(message = "不能为空")
    @Size(min = 1, max = 50, message = "长度为1~50字符")
    @ApiModelProperty("城市")
    private String city;

    @NotBlank(message = "不能为空")
    @Size(min = 1, max = 50, message = "长度为1~50字符")
    @ApiModelProperty("区县")
    private String district;

    @NotBlank(message = "不能为空")
    @Size(min = 1, max = 100, message = "长度为1~100字符")
    @ApiModelProperty("详细地址")
    private String addressDetail;

    @ApiModelProperty("是否默认地址（添加时无需传入")
    private Boolean defaultAddress;

}
